The program enables you to determine the type of any disk in an SSD slot, or directly attached to your Series 3/3a through the serial expansion port. These disks include Flash and RAM SSDs and devices containing software on ROM (read only memory). For example both the 3Fax and the 3Link contain ROM disks and will be reported as 'Disk C: ROM' by the program. It does not list any remote disks available via the 3Link. The program demonstrates the use of Operating System Calls the construction of a list dialog and the method for calling procedures. The DevType procedure could be integrated into any program and could be of use, for example, in the writing of applications that need to identify and frequently save data to RAM disks only. The listing follows. The REM statements are explanatory comments and need not he included if you type in the listing. PROC main: REM Main procedure that calls üevType LOCAL count% REM Counter for choice of disk LOCAL disk$(2) REM Stores disk GLOBAL ret$(30) REM Stores type of disk returned by DevType count%=2 REM Set default choice of disk to internal dINIT "Disk Check" REM Prepare for definition of a dialog dCHOICE count%,"Disk:","A,Internal,B,C REM Present list of disks to select from " IF DIALOG=0 STOP REM Stop program if dialog is cancelled ELSEIF count%=l REM Disk A selected disk$="A" ELSEIF count%=2 disk$="M" ELSEIF count%=3 disk$="E" ELSEIF count%=4 disk$="C" ENDIF ret$=DevType$: (disk$l gAT 10,20 gPRINT "Disk",disk$," ",ret$ BUSY " Press any key" GET ENDP pROC DevType$: (s$) LOCAL ax%,bx%,CX%,dx%,Si%,di% LOCAL flags% REM Register flags returned by calls to 05 LOCAL err% REM Error flags returned LOCAL slot$(8),pslot% LOCAL buff%(32),pbuff% LOCAL type% slot$ = "LOG::" + S$ + ":" + CHR$(0) REM Zero terminated string contains device to interrogate pslot% = ADDR(slot$) + 1 REM pointer to slot$ Pbuff% = ADDR(buff%()) REM pointer to buff$ ax% = $0a00 REM AH set to $0A tells File Manager to perform REM FilStatusDevice bX% = pslot% REM ax holds pointer to the name of the file system cX% = pbuff% REM CX holds point~r to a üeviceStatusEnt flags% = OS($0087,ADDR(ax%)) REM $0087 accesses File Manager services type%=buff%(2) AND $07 REM pick out bits that relate to the device tYpe IF flags% AND 1 REM if carry flag is set then device name 15 lnvalid err% = ax% OR $ff00 REM So handle errors ret$ = ERR$(err%) ELSE IF tYpe% = 3 ret$ = "Flash" ELSEIF type% = 4 ret$ = "RAM" ELSEIF type% = 5 ret$ = "ROM" ELSEIF type% = 6 ret$ = "Write protected' ELSE ret$ = "Unknown" ENDIF ENDIF RETURN ret$ ENDP REM Return the type of the disk in ret$